public class testcontrolar {

    /*public void getvalue() {

               sObject s = [select id, name from account where name = 'RETAIL' limit 1];
                system.debug(s);
    }


    public void insertmethod() {
     
  Account a = new Account(name = 'RETAIL', billingcity = 'San Francisco');
  Insert a;

    }
     public void updatemethod() {
     
   sObject s = [select id, name from account where name = 'RETAIL' limit 1];
  
  Update s;

    }*/
    
    Account account;

    public PageReference save() {
    try{
        update account;
    }
    catch(DmlException ex){
        ApexPages.addMessages(ex);
    }
    return null;
    }

    public String getName() { 
        return 'MyController';
    }

    public Account getAccount() {
    
        if(account == null)
        account = [select id, name, numberofemployees, numberoflocations__c from Account
        where id = :ApexPages.currentPage().getParameters().get('id')];
        return account;
    }


}